export const defaultMockMenu = [
    {
        code: 'Banner',
        name: '活动管理',
    },
    {
        name: '商品管理',
        code: 'Product',
        children: [
            {
                name: '商品分类',
                code: 'ProductCategory',
            },
            {
                name: '商品列表',
                code: 'ProductList',
            },
        ]
    },
    {
        code: 'ProductOrder',
        name: '订单管理',
    },
    {
        code: 'Gift',
        name: '礼品管理',
        children: [
            {
                code: 'GiftCategory',
                name: '礼品分类',
            },
            {
                code: 'GiftList',
                name: '礼品列表',
            },
            {
                code: 'GiftSend',
                name: '礼品发放历史',
            },
            {
                code: 'GiftOrder',
                name: '礼品核销',
            },
        ]
    },
    {
        code: 'Member',
        name: '会员管理',
    },
]

export function getStatus(item) {
    if (item.order_status === 0 || item.order_status === 3) {
        if (item.status === 1) {
            return '待支付'
        } else if (item.status === 2) {
            if (item.address_id) {
                return '待发货'
            } else {
                return '待自提'
            }
        } else if (item.status === 3) {
            return '运输中'
        } else if (item.status === 4) {
            return '待收货'
        } else if (item.status === 5) {
            return '交易成功'
        }
    }  else if (item.order_status === 1) {
        return '退款中'
    } else if (item.order_status === 2) {
        return '退款成功'
    }
}